package yr.website

class Apply {
    String job
    String username
    String sex
    String education
    String phone
    String mail
    String filePath
    Date applyDate
    Boolean state

    /**
     * 映射。
     */
    static mapping = {
        table "sys_apply"
        version false
        username(column: "name", sqlType: "varchar(32)")
        education(column: "education", sqlType: "varchar(50)")
        phone(column: "phone", sqlType: "varchar(50)")
        mail(column: "email", sqlType: "varchar(50)")
        filePath(column: "file_path", sqlType: "varchar(255)")
        job(column: "job", sqlType: "varchar(30)")
        applyDate(column: "apply_date", sqlType: "datetime")
        state(column: "state", sqlType: "tinyint(1)", defaultValue: "1", insertable: false)
        sex(column: "sex", sqlType: "varchar(1)")
    }

    static constraints = {
        username(nullable: false, unique: false)
        education(nullable: false, unique: false)
        phone(nullable: false, unique: false)
        filePath(nullable: false, unique: false)
        mail(nullable: false, unique: false)
        job(nullable: false, unique: false)
        applyDate(nullable: false, unique: false)
        sex(nullable: false, unique: false)
        state(nullable: false, unique: false)
    }
}
